let username = 'zhangsan';
let age = 12;
let obj = {
    // username:username,
    // age:age,
    // 对象内的属性值如果用的是同名变量，可以简写
    age,
    username,
    // sayName:function () { },
    sayName:()=>{},
    sayName(){
        console.log(this);
        console.log(this.username);
    },
}
obj.sayName();